package com.lichuandi.infer;

// 定义接口
public interface PaymentService {
    void pay(double amount);
    String getProviderName();

    // Java 8 默认方法
    default void logPayment(double amount) {
        System.out.println("Payment processed: " + amount);
    }

    // Java 8 静态方法
    static PaymentService getInstance(String type) {
        return new DefaultPaymentService();
    }
}